import 'package:chaos_flutter3/chaos/dtos/Dto.dart';
import 'package:json_annotation/json_annotation.dart';

part 'ZyyShareDoc.g.dart';

@JsonSerializable()
class ZyyShareDoc {
  late String id;
  late String username;
  late String shareCode;
  late String shareAddress;

  ZyyShareDoc(this.id, this.username, this.shareCode, this.shareAddress);

  factory ZyyShareDoc.fromJson(Map<String, dynamic> json) =>
      _$ZyyShareDocFromJson(json);

  Map<String, dynamic> toJson() => _$ZyyShareDocToJson(this);

  static List<ZyyShareDoc> toList(List<dynamic> listData) =>
      listData.map((e) => ZyyShareDoc.fromJson(e)).toList();
}
